package com.common.service.impl;

import com.common.mapper.RoleMapper;
import com.common.model.Role;
import com.common.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {

    private RoleMapper roleMapper;

    @Autowired
    public RoleServiceImpl(RoleMapper roleMapper) {
        this.roleMapper = roleMapper;
    }

    @Override
    public List<Role> findByAdminId(long adminId) {
        return roleMapper.selectAllByAdminId(adminId);
    }
}
